/* 聊天室样式 */
.chat-container {
    display: flex;
    min-height: 100vh;
    padding: 20px;
    flex-direction: row;
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: calc(100vh - 40px);
}

.chat-messages {
    flex: 1;
    background: white;
    border-radius: 8px;
    padding: 20px;
    overflow-y: auto;
    margin-bottom: 20px;
    height: calc(100% - 100px);
    -webkit-overflow-scrolling: touch;
}

.message {
    margin-bottom: 10px;
    padding: 8px;
    border-radius: 4px;
    background: #f0f2f5;
    line-height: 1.4;
    word-break: break-word;
    max-width: 85%;
}

.system-message {
    background: #fff3cd;
    color: #856404;
    font-size: 0.9em;
    text-align: center;
}

.chat-input {
    display: flex;
    gap: 10px;
    height: 80px;
    position: relative;
    background: white;
}

.chat-input textarea {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: none;
    font-size: 16px;
    height: 100%;
}

.chat-input button {
    width: 80px;
    height: 80px;
    background: #1877f2;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    flex-shrink: 0;
}

.online-users {
    width: 200px;
    background: white;
    border-radius: 8px;
    padding: 20px;
    flex-shrink: 0;
    height: calc(100vh - 40px);
    overflow-y: auto;
}

.online-users ul {
    list-style: none;
}

.online-users li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    word-break: break-all;
}

/* 添加用户信息样式 */
.user-info {
    background: white;
    padding: 10px 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-size: 16px;
    color: #333;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .chat-container {
        flex-direction: column;
        padding: 10px;
    }

    .chat-main {
        height: calc(100vh - 200px);
        order: 2;
    }

    .online-users {
        width: 100%;
        height: 120px;
        order: 1;
        margin-bottom: 10px;
    }

    .online-users ul {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }

    .online-users li {
        border: 1px solid #eee;
        padding: 5px 10px;
        border-radius: 20px;
        margin: 0;
    }

    .chat-input {
        height: 60px;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 10px;
        background: #fff;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        z-index: 1000;
    }

    .chat-input textarea {
        height: 40px;
        padding: 8px;
    }

    .chat-input button {
        width: 60px;
        height: 40px;
        font-size: 14px;
    }

    .chat-messages {
        height: calc(100% - 80px);
        margin-bottom: 70px;
        padding-bottom: 60px;
    }

    .user-info {
        margin-bottom: 10px;
        font-size: 14px;
        padding: 8px 15px;
    }
} 